package com.nulldev.util.threading.event;

import java.util.Date;

public interface Event {
	/**
	 * Gets the originating object of this event.
	 *
	 * @return Originating object.
	 */
	public Object getSource();
	
	/**
	 * Gets the type of the event. Implementing classes sould define the possible
	 * types. Event handlers should check for the class of the event object
	 * (e.g. with instanceOf operator), then check for the type.
	 *
	 * @return Event type (specified by implementing classes).
	 */
	public int getType();
	
	/**
	 * Gets the time when this event occurred.
	 *
	 * @return Date object representing the time of the event.
	 */
	public Date getDate();
}
